package edu.pku.sei.modeler.uml.generated;

import org.eclipse.ui.IStartup;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;

import edu.pku.sei.modeler.explorer.MetaModelView;


public class MainStartUp implements IStartup {

	/* (non-Javadoc)
	 * @see org.eclipse.ui.IStartup#earlyStartup()
	 */
	public void earlyStartup() {
//		System.out.println("uml bundle started");
//		context.registerService(AbstractProjectFactory.class.getName(), factory, null);
		
		
		IWorkbenchWindow win = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
		if(win!= null) {
			IViewPart view = win.getActivePage().findView("edu.pku.sei.modeler.explorer.MetaModelView");
			if(view instanceof MetaModelView) {
//				((MetaModelView)view).getViewer().setContentProvider(new UMLModelContentProvider());
//				((MetaModelView)view).getViewer().setLabelProvider(new UMLModelLabelProvider());
			}
		}
	}

}